﻿using System;

class SumOfFirstNFibonacci
{
    static void Main()
    {
        Console.WriteLine("Enter a number N:");
        int N = int.Parse(Console.ReadLine());
        int Fib1 = 0;
        int Fib2 = 1;
        int Sum = 0;
        for (int i = 1; i <= N; i++)
        {
            int Fibn = Fib1;
            Sum += Fibn;
            Fibn = Fib1 + Fib2;
            Fib1 = Fib2;
            Fib2 = Fibn;
        }
        Console.WriteLine(Sum);
    }
}

